<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">分类名称</label>
        <div class="layui-input-block">
            {if $vo and isset($vo.title)}
            <input name="title" value='{$vo.title|default=""}'
                   required="required" title="请输入分类名称" placeholder="请输入分类名称" class="layui-input ">
            {else /}
            <input name="title" value='{$vo.title|default=""}' required="required" 
                   title="请输入分类名称" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">副标题</label>
        <div class="layui-input-block">
            {if $vo and isset($vo.description)}
            <input name="description" value='{$vo.description|default=""}'
                   required="required" title="请输入副标题" placeholder="请输入副标题" class="layui-input ">
            {else /}
            <input name="description" value='{$vo.description|default=""}' required="required"
                   title="请输入副标题" class="layui-input">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">扩展分类</label>
        <div class="layui-input-block">
            <input type="radio"  name="is_exp" value="0"  {if condition="$vo.is_exp eq 0"} checked {/if} title="否" >
            <input type="radio"  name="is_exp" value="1" {if condition="$vo.is_exp eq 1"} checked {/if}  title="是" >
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">上传图片</label>
            <div class="uploadimage"><input type="hidden" name="logo" value="{if condition='!empty($vo.logo)'} {$vo.logo} {/if}" /></div>
            <a data-file="one" data-field="logo" data-type="png,jpg,jpeg" data-uptype="qiniu" href="javascript:void(0)"
               class="uploadbutton">上传图片</a>
            <script>
                require(['jquery'], function () {
                    $('[name="logo"]').on('change', function () {
                        $(this).parent().attr('data-tips-image', this.value).css('backgroundImage', 'url(' + this.value + ')');
                    });
                });
            </script>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            {if $vo and isset($vo.dis_order)}
            <input name="dis_order" value='{$vo.dis_order|default=""}'
                   required="required" title="请输入1~200之间的数字，数字越大排序越靠前"   placeholder="请输入1~200之间的数字，数字越大排序越靠前" class="layui-input ">
            {else /}
            <input name="dis_order" value='{$vo.dis_order|default=""}' required="required"
                   title="请输入1~200之间的数字，数字越大排序越靠前" class="layui-input">
            {/if}
        </div>
    </div>

    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label">上级分类</label>-->
        <!--<div class="layui-input-block">-->
            <!--<select name="pid" lay-verify="" lay-search>-->
                <!--<option value="0">顶级分类</option>-->
                <!--{volist name='list' id='v'}-->
                <!--<option value="{$v.id}" {if condition="$vo['pid'] eq $v['id']"} selected {/if}>{$v.title}</option>-->
                <!--{/volist}-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
    <!-- <div class="layui-form-item">
        <label class="layui-form-label">上传图片</label>
            <div class="uploadimage"><input type="hidden" name="logo"/></div>
            <a data-file="one" data-field="logo" data-type="png,jpg" data-uptype="qiniu" href="javascript:void(0)"
               class="uploadbutton">上传图片</a>
            <script>
                require(['jquery'], function () {
                    $('[name="logo"]').on('change', function () {
                        $(this).parent().attr('data-tips-image', this.value).css('backgroundImage', 'url(' + this.value + ')');
                    });
                });
            </script>
    </div> -->
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        {if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
    <script>window.form.render();</script>
</form>
